home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Personal Computer World 2009 February
/
PCWFEB09.iso
/
Software
/
Resources
/
Chat & Communication
/
Digsby build 37
/
digsby_setup.exe
/
lib
/
simplejson
/
tool.pyo
(
.txt
)
< prev
Wrap
Python Compiled Bytecode
|
2008-10-13
|
911b
|
32 lines
# Source Generated with Decompyle++
# File: in.pyo (Python 2.5)
import simplejson
def main():
import sys as sys
if len(sys.argv) == 1:
infile = sys.stdin
outfile = sys.stdout
elif len(sys.argv) == 2:
infile = open(sys.argv[1], 'rb')
outfile = sys.stdout
elif len(sys.argv) == 3:
infile = open(sys.argv[1], 'rb')
outfile = open(sys.argv[2], 'wb')
else:
raise SystemExit('%s [infile [outfile]]' % (sys.argv[0],))
try:
obj = simplejson.load(infile)
except ValueError:
e = None
raise SystemExit(e)
simplejson.dump(obj, outfile, sort_keys = True, indent = 4)
outfile.write('\n')
if __name__ == '__main__':
main()